package com.ykt.validator;

import com.jfinal.core.Controller;

/**
 * 摄像头API参数校验
 * @author long.hua
 * @version 1.0.0
 * @since 2016-01-09 23:12
 */
public class CameraValidator {


    public static class ShopCameraValidator extends BaseValidator {

        @Override
        protected void validate(Controller c) {
            validateRequired("shopId", "shopIdMsg", "必须传正确的商铺编号");
        }

        @Override
        protected void handleError(Controller c) {
            c.renderJson(super.toJsonText(c));
        }
    }

    public static class MarketCameraValidator extends BaseValidator {

        @Override
        protected void validate(Controller c) {
            validateRequired("marketId", "marketIdMsg", "必须传正确的市场编号");
        }

        @Override
        protected void handleError(Controller c) {
            c.renderJson(super.toJsonText(c));
        }
    }

}
